package branch;

public class DeadFor
{
    public static void main(String[] args)
    {
        //test();
        test1();
        //test2();
        test3();

    }

    public static void test()
    {
        while(true)
        {
            System.out.println("hello");
        }

    }


    public static void test1()
    {
        for(int i = 0;i<=4;i++)
        {
            for(int j = 0; j<5;j++)
            {
                System.out.print("*");
            }
            System.out.println();
        }
    }

    public static void test2()
    {
        //1,定义一个循环控制打印多少行
        int i = 0;
        for(i = 1; i<=9; i++)
        {
            //2，定义一个循环控制当前行的列信息
            int j = 0;
            for(j = 1;j <=i; j++)
            {
                System.out.print(j +"x"+ i +"="+(i*j)+"\t");
            }
            System.out.println();
        }


    }

    public static void test3()
    {
        int i = 0;
        int j = 0;
        for(i = 1;i <= 9;i++)
        {
            for(j = 1;j<=i;j++)
            {
                System.out.print(j+"x"+ i + "=" + (j * i) + "\t");
            }
            System.out.println();
        }

    }


}
